{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[{"file_id":"1le54TOhv2hgHE7KYXfNCA3dUYuFVDd6A","timestamp":1721014420960},{"file_id":"1FsvZoMYYp89VGP3eE9zaaldOxEAYB7Pg","timestamp":1721013773571},{"file_id":"183QQfRrcEwnLeVQo4e99b6WTWJb2VZC2","timestamp":1720970240138},{"file_id":"14MBdmmcm4NMPSiZiLq3_IK_qbMhYUN6d","timestamp":1720970088120},{"file_id":"1cqAJrxi3BXDeizZAYTIu0GJxkb-1HrNZ","timestamp":1720967440407}],"gpuType":"T4","collapsed_sections":["gaD7ugivEL2R","z0Sek0wtEs5n"]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"accelerator":"GPU"},"cells":[{"cell_type":"markdown","source":["# 数据集导入(预制链接)"],"metadata":{"id":"kBRw5QHhBkax"}},{"cell_type":"markdown","source":["## 官方版本数据导入"],"metadata":{"id":"gaD7ugivEL2R"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"hfHjWRgKBR47","collapsed":true},"outputs":[],"source":["# !wget --header=\"Host: drive.usercontent.google.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Cookie: __Secure-ENID=12.SE=Yd0Bj-CLJ14fnd4qzdJHmwUs4B5zz46UaPC1cPJigNqqFV9PtM2CYyBpSbCkOyzUwzlEdZ1nZFf-igtGi7wSdJ_gqQSfQfh84r9egqFQAy9-GKayCRbdQKdera-2mkpuIT-c64CyR9vfNojM3hxZ9Dej-dGvtxlGjal9ttEHybw; __gsas=ID=ae0421b9a34b478c:T=1710758437:RT=1710758437:S=ALNI_MZP13R9ZOHbCzC0rgHSMrGXj6GCsg; HSID=A-4I-ZudDNUIB6EKH; SSID=A7v_1v9un6xAwVNku; APISID=ctK8IbLjeuDUmgys/AFnMSLWt9KddceDI6; SAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; __Secure-1PAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; __Secure-3PAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; SID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_kzuBV1TvOhAIC8VF1e9fpgACgYKATQSARQSFQHGX2Mi8LXUwWoIwNCEPU8Sy3mXUxoVAUF8yKqGXVfjTGz9gQal7nwGr4Pl0076; __Secure-1PSID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_PDa-DzVmbdGFPyxMQpk9_QACgYKAewSARQSFQHGX2MiAeee4fn0OWglWZfAygqkyBoVAUF8yKp-Sfmtnueimxc-0QbJRF9I0076; __Secure-3PSID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_g9IrMeU98APBo9Stp6wEnAACgYKAQASARQSFQHGX2MiFWtc9ucONXnpxBzlRdudEhoVAUF8yKoeZwCpJDnjfAFjGssHSUGm0076; NID=515=GQhY9nKKFCx3qFDjE0MA4ubjWNdef6xCIY_RfWOPWKEtyfBN3nAUl8WHI2VczjNQ4rVkj1XBAY8WNWHXyqSK10CfT4FxsFlPzrHIJpeTtm1nWRNBd9AAfBKJHz4XpESszntVUTE_59RklZuKo0vk1poReVi2da1PZKC3CTKH2Ll3gB5xuB9wf4bmq8ylVUuIROPJczr0XnCuUHV3qLdBvgy9_870b6UwOq1iOlIxFQFm01EZ4pqF4q1Ub3QRSWpEMLh4LSZFpJ5O255R5OV7krmEdDvH_sHoTEPZAg2PoEpwAyGK6Xp9qcLIlldgx5-5V86N8Wtb93uTlQuA_CFXb5_2eP3bgeX8txwlJ5SrldVjg9ctzYtBU2RwJKTSvdHfIG7lpOkg6XlkvDOcJpR3DihT_OlqnPn7drCAJpvVDv29hZn5XPMXaSrNdbG64OJ9urJEw5odEwsLYkkpC1vmlUcuoo52S5f6RQu0Z8kZiV8iRW6XIqHsSmQHunVaxk6xWCStUg; __Secure-1PSIDTS=sidts-CjEB3EgAEtTS0OazynCofIH4RCBstiRP5flEcvYW3z4Fg9oGd5QOESDOZt1wO2iqUYHjEAA; __Secure-3PSIDTS=sidts-CjEB3EgAEtTS0OazynCofIH4RCBstiRP5flEcvYW3z4Fg9oGd5QOESDOZt1wO2iqUYHjEAA; SIDCC=AKEyXzVI6aMX8lSDja86Yts3FBAtBzPCzVNgaX5BCz78NWsWzlT3yFWKUV7ZE46SFzE1GiBI-cHdTw; __Secure-1PSIDCC=AKEyXzUo4NQAwqqPMxP2eye-MFEbZmBIm_sZqRU1amttg0YoQkc8ZKSNXdHl5jNCMEbhrUHhS9-K; __Secure-3PSIDCC=AKEyXzWf2lIdmDLeZKpXSi9GytVQb6XudrYiNUBA5gW952YuLh8kL6T3IbBlu8zOTfGEcdUp5O1R\" --header=\"Connection: keep-alive\" \"https://drive.usercontent.google.com/download?id=1JwR0Q1ArTg6c47EF2ZuIBpQwCPgXKrO2&export=download&authuser=0&confirm=t&uuid=dc3aa13c-c3a9-458f-983a-8586798cb635&at=APZUnTX25XMxi-z-3wBcgR93IGsL%3A1719235792953\" -c -O 'Dataset.zip'\n","# !unzip Dataset.zip\n","# centroid-3\n","# !wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1hxpOsqOZefdrba_BqnW490XpNX_LgXPB' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p'\n","\n","# # centroid 3\n","# !wget -P /content/train_track_B_e/  --header=\"Host: drive.usercontent.google.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh,zh-CN;q=0.9,en;q=0.8\" --header=\"Cookie: AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzkuJRXpDLmC_XxoVAUF8yKpkSuSLMm7wN8kPiklDLWpD0076; __Secure-1PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7eTxKEPCbtKJP-WpB0sS7IwACgYKAQ0SARYSFQHGX2MimRYfxLjZZnsSbRUyLnXj-xoVAUF8yKpK6mH60avbvj7dWu_Wtvny0076; __Secure-3PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7uXG5Vbh6OrUmdFmX1D1k3gACgYKAWMSARYSFQHGX2MiFsS_t8MOTqmRAcbHsxqG8RoVAUF8yKp0GCuI4xnwYrlT9L1pS6Ol0076; HSID=Ak0_J4cMdWxYYLsNT; SSID=AIMT0qtQWmO9_ImAP; APISID=h9-r_ylvYL8SAAMr/A-iHpJeO9Apsuge6w; SAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-1PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-3PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; S=billing-ui-v3=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL:billing-ui-v3-efe=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL; NID=515=NM4LfLVBoYJ9i81Kc-NBiwctEbhMRSl5wmR6n307U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mEiHlXAxO1oEiuYbmBCBE3p-5pqJ994EzbTJd3_QQ; __Secure-1PSIDTS=sidts-CjEB4E2dkV-dW8Lnp_YdycI6u6bVwjs_cCmjckn3lFfMrNq-r5yNUJl77XwR9n9NrJVAEAA; __Secure-3PSIDTS=sidts-CjEB4E2dkV-dW8Lnp_YdycI6u6bVwjs_cCmjckn3lFfMrNq-r5yNUJl77XwR9n9NrJVAEAA; SIDCC=AKEyXzVLe-Y_mY0pCOY45f2Kg7dK1S2riGGS-k5W_zlnb37jiozs2UqXbc99I-nD954_CqFWMA; __Secure-1PSIDCC=AKEyXzWM9ORAjWwJOpU66618r7UPi3nwmxKQQlNsy01uThGuc22ba461DkdFvhyzXUVrkyl6FA; __Secure-3PSIDCC=AKEyXzUh3Eh2JDeKKaDu9L2p3zaxDD_ZJWoKtFiw9Hg-tIkraBGOIR7V2NXoabA0un4e7Sh9ibQ\" --header=\"Connection: keep-alive\" \"https://drive.usercontent.google.com/download?id=1W0jmrRX11DnRqU4QvGMlWFSlcItyeh0R&export=download&authuser=0&confirm=t&uuid=23a03d1a-abc8-42c8-b2e9-ac15544ce09b&at=APZUnTUcKjp9S2N1MeUHjjEMQv8Z%3A1720882064537\" -c -O 'centroid_3.zip'\n","# # centroid 2\n","# !wget -P /content/train_track_B_e/  --header=\"Host: drive.usercontent.google.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh,zh-CN;q=0.9,en;q=0.8\" --header=\"Cookie: AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzkuJRXpDLmC_XxoVAUF8yKpkSuSLMm7wN8kPiklDLWpD0076; __Secure-1PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7eTxKEPCbtKJP-WpB0sS7IwACgYKAQ0SARYSFQHGX2MimRYfxLjZZnsSbRUyLnXj-xoVAUF8yKpK6mH60avbvj7dWu_Wtvny0076; __Secure-3PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7uXG5Vbh6OrUmdFmX1D1k3gACgYKAWMSARYSFQHGX2MiFsS_t8MOTqmRAcbHsxqG8RoVAUF8yKp0GCuI4xnwYrlT9L1pS6Ol0076; HSID=Ak0_J4cMdWxYYLsNT; SSID=AIMT0qtQWmO9_ImAP; APISID=h9-r_ylvYL8SAAMr/A-iHpJeO9Apsuge6w; SAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-1PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-3PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; S=billing-ui-v3=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL:billing-ui-v3-efe=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL; NID=515=NM4LfLVBoYJ9i81Kc-NBiwctEbhMRSl5wmR6n307UZGSzQGEMmfjGt37rGvWmr0kpME0asDPCVyOzRzWOQAE6tAeXOUlI-t456WBIvImfRgmWWMOsHrakcWQkh6tJpukjL302wlmwg58aKKzGf0A9FLjP_8ICtkhzJyPGNP9-UrXbObciHjanJe9QQ7HUQWK6o-ykNOyEMQdYRUyxuAiUNGs-J8CYs_FMGoehXTFhvCDRwk6BJc5fAFm7UJP6rqztlNPRsJwt04Zd3Gvhd_flNhUeLCSR8ZHFzeAbO4805TE9uuSCcny3CLGv9zsEsfbDtZEAGfDY8EzT_xm7jr7jzO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CqFWMA; __Secure-1PSIDCC=AKEyXzWM9ORAjWwJOpU66618r7UPi3nwmxKQQlNsy01uThGuc22ba461DkdFvhyzXUVrkyl6FA; __Secure-3PSIDCC=AKEyXzUh3Eh2JDeKKaDu9L2p3zaxDD_ZJWoKtFiw9Hg-tIkraBGOIR7V2NXoabA0un4e7Sh9ibQ\" --header=\"Connection: keep-alive\" \"https://drive.usercontent.google.com/download?id=1W0jmrRX11DnRqU4QvGMlWFSlcItyeh0R&export=download&authuser=0&confirm=t&uuid=23a03d1a-abc8-42c8-b2e9-ac15544ce09b&at=APZUnTUcKjp9S2N1MeUHjjEMQv8Z%3A1720882064537\" -c -O 'centroid_3.zip'\n"]},{"cell_type":"markdown","source":["## 百度Baseline版本数据导入"],"metadata":{"id":"z0Sek0wtEs5n"}},{"cell_type":"code","source":["# !wget --header=\"Host: ai-studio-online.bj.bcebos.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Referer: https://aistudio.baidu.com/\" \"https://ai-studio-online.bj.bcebos.com/v1/1638f9c292b9437bb46885186407a63e584856c91f9f4c18908b87abd46471e0?responseContentDisposition=attachment%3B%20filename%3Dtrack_B.zip&authorization=bce-auth-v1%2F5cfe9a5e1454405eb2a975c43eace6ec%2F2024-05-05T03%3A02%3A25Z%2F-1%2F%2Fcfdfd6b6a9e096c761ee8e7d863d586741c69a9e6de89f9c3696706d35f8b265\" -c -O 'track_B.zip'\n","# !wget --header=\"Host: ai-studio-online.bj.bcebos.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Referer: https://aistudio.baidu.com/\" \"https://ai-studio-online.bj.bcebos.com/v1/2dddd05e577849ad95e1fe1133d3af29d13085ac0cfd499c853ff5d9df2ac07f?responseContentDisposition=attachment%3B%20filename%3Dtrain_data.zip&authorization=bce-auth-v1%2F5cfe9a5e1454405eb2a975c43eace6ec%2F2024-05-05T03%3A23%3A33Z%2F-1%2F%2F8540633c7e39fddf8471d6d8206c3b761748c58c06005acb218593a8df19d7f1\" -c -O 'train_data.zip'\n","# !wget --header=\"Host: ai-studio-online.bj.bcebos.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Referer: https://aistudio.baidu.com/\" \"https://ai-studio-online.bj.bcebos.com/v1/a96dc8ba8201445b966980a0a48f52705338a48e29e64c53bddb7ef8861c5123?responseContentDisposition=attachment%3B%20filename%3Dtrack_A.zip&authorization=bce-auth-v1%2F5cfe9a5e1454405eb2a975c43eace6ec%2F2024-05-06T07%3A54%3A51Z%2F-1%2F%2F17b5155bd16a8af1e4af971498082687656af7fcecfc5a8e57591b85053210ec\" -c -O 'track_A.zip'\n","# !wget --header=\"Host: ai-studio-online.bj.bcebos.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Referer: https://aistudio.baidu.com/\" \"https://ai-studio-online.bj.bcebos.com/v1/dcaba9f0e87549e395e1682a4a0a43c547a896034e3f4417a4d10ba85a949944?responseContentDisposition=attachment%3B%20filename%3DPaddleScience.zip&authorization=bce-auth-v1%2F5cfe9a5e1454405eb2a975c43eace6ec%2F2024-05-11T16%3A01%3A57Z%2F-1%2F%2Fb2149791689d3b19c02a86782229901cb75743d07c7163dfa185fea286cd1f02\" -c -O 'PaddleScience.zip'\n","# !wget --header=\"Host: ai-studio-online.bj.bcebos.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Referer: https://aistudio.baidu.com/\" \"https://ai-studio-online.bj.bcebos.com/v1/38e9adf0fce84527aad3558cc3e82d0e9a251aac4c934297afae9b74d9b3d1e9?responseContentDisposition=attachment%3B%20filename%3Dtrain_track_B.zip&authorization=bce-auth-v1%2F5cfe9a5e1454405eb2a975c43eace6ec%2F2024-06-04T03%3A21%3A02Z%2F-1%2F%2Facd359add161bace603a52c7a268467406cb3c1889a7114bbb687de8002b55f6\" -c -O 'train_track_B.zip'\n","# !wget --header=\"Host: ai-studio-online.bj.bcebos.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Referer: https://aistudio.baidu.com/\" \"https://ai-studio-online.bj.bcebos.com/v1/7877c2fd300345599ed3365feda50425f4857caa71bf4af9bf047fb08e35aa97?responseContentDisposition=attachment%3B%20filename%3Dmesh_B_0603.zip&authorization=bce-auth-v1%2F5cfe9a5e1454405eb2a975c43eace6ec%2F2024-06-04T11%3A48%3A26Z%2F-1%2F%2Fec6cce492ba6afff841ef197860065742a7ba8220def02c1cbc311333aa993b2\" -c -O 'mesh_B_0603.zip'\n","# !wget --header=\"Host: ai-studio-online.bj.bcebos.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Referer: https://aistudio.baidu.com/\" \"https://ai-studio-online.bj.bcebos.com/v1/a02dba5700974c6a811f579fff216ccf9a4129b849994dcca99390b222c28572?responseContentDisposition=attachment%3B%20filename%3D3rd_lib.zip&authorization=bce-auth-v1%2F5cfe9a5e1454405eb2a975c43eace6ec%2F2024-06-08T05%3A29%3A20Z%2F-1%2F%2Fef71819149664a3c8438d3dfd02544e77cdb4fda679efbdd402b4e2c77a2c06d\" -c -O '3rd_lib.zip'\n","# !ls\n","# !cd sample_data"],"metadata":{"id":"GTV_YDaxEsd3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# !unzip 3rd_lib.zip\n","# !unzip PaddleScience.zip"],"metadata":{"id":"cs8g_rlLjg-W"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# !mkdir -p track_B && unzip -o track_B.zip -d track_B/\n","# !mkdir -p train_data && unzip -o train_data.zip -d train_data/\n","# !mkdir -p track_A && unzip -o track_A.zip -d track_A/\n","# !mkdir -p train_track_B && unzip -o train_track_B.zip -d train_track_B/\n","# !mkdir -p mesh_B_0603 && unzip -o mesh_B_0603.zip -d mesh_B_0603/"],"metadata":{"id":"OS4r3PcokLdA"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## 自定义导入(在下面代码块导入并解压您的数据集)"],"metadata":{"id":"kY81z-fCgPfK"}},{"cell_type":"markdown","source":[],"metadata":{"id":"ITzT8s2wgZG0"}},{"cell_type":"code","source":["!pip install gdown"],"metadata":{"id":"8-CzlzA_Dflz","executionInfo":{"status":"ok","timestamp":1721013349242,"user_tz":-480,"elapsed":9386,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"de19026f-1c75-4fba-953f-debbe1ea0a81","colab":{"base_uri":"https://localhost:8080/"}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: gdown in /usr/local/lib/python3.10/dist-packages (5.1.0)\n","Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.10/dist-packages (from gdown) (4.12.3)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from gdown) (3.15.4)\n","Requirement already satisfied: requests[socks] in /usr/local/lib/python3.10/dist-packages (from gdown) (2.31.0)\n","Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from gdown) (4.66.4)\n","Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4->gdown) (2.5)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests[socks]->gdown) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests[socks]->gdown) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests[socks]->gdown) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests[socks]->gdown) (2024.7.4)\n","Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in /usr/local/lib/python3.10/dist-packages (from requests[socks]->gdown) (1.7.1)\n"]}]},{"cell_type":"code","source":["import gdown\n","import os\n","import zipfile\n","\n","def unzip_file(zip_path, extract_to):\n","  # 检查目标目录是否存在，如果不存在则创建\n","  if not os.path.exists(extract_to):\n","    os.makedirs(extract_to)\n","\n","  # 打开ZIP文件\n","  with zipfile.ZipFile(zip_path, 'r') as zip_ref:\n","    # 解压缩所有文件\n","    zip_ref.extractall(extract_to)\n","\n","###################### code ######################\n","file_id = '1e37uxy19ztcRnztpmaHHPsY0SsiQSzy0' # 文件ID\n","destination = '/code_A.zip' # 文件下载路径\n","download_url = f'https://drive.google.com/uc?id={file_id}' # 构建下载URL\n","if not os.path.exists(destination):\n","  gdown.download(download_url, destination, quiet=False) # 下载文件\n","\n","zip_file_path = destination # 压缩文件路径\n","extract_directory = '/content/code_A' # 解压目录\n","unzip_file(zip_file_path, extract_directory)"],"metadata":{"id":"6dRUb-yIqf3U","executionInfo":{"status":"ok","timestamp":1721013356688,"user_tz":-480,"elapsed":7448,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"e4dd6973-92d8-4228-ed87-16057968b206","colab":{"base_uri":"https://localhost:8080/"}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["Downloading...\n","From (original): https://drive.google.com/uc?id=1e37uxy19ztcRnztpmaHHPsY0SsiQSzy0\n","From (redirected): https://drive.google.com/uc?id=1e37uxy19ztcRnztpmaHHPsY0SsiQSzy0&confirm=t&uuid=3f2ec03a-7d0c-463a-a43b-faf9d6e85dc5\n","To: /code_A.zip\n","100%|██████████| 60.6M/60.6M [00:02<00:00, 21.9MB/s]\n"]}]},{"cell_type":"markdown","source":["# 包导入规范"],"metadata":{"id":"PmlOGK6yPVGu"}},{"cell_type":"code","source":["!pip install meshio\n","!pip install open3d\n","!pip install einops\n","!pip install paddlepaddle\n","!pip install timm\n","!pip install spconv\n","!pip install requests"],"metadata":{"id":"5BpUUjWDq2QC","executionInfo":{"status":"ok","timestamp":1721013513139,"user_tz":-480,"elapsed":156461,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"33f0e360-af22-4696-b237-d9a9b03708a8","colab":{"base_uri":"https://localhost:8080/"}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Collecting meshio\n","  Downloading meshio-5.3.5-py3-none-any.whl (166 kB)\n","\u001b[?25l     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/166.2 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K     \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[90m╺\u001b[0m \u001b[32m163.8/166.2 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m166.2/166.2 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: numpy>=1.20.0 in /usr/local/lib/python3.10/dist-packages (from meshio) (1.25.2)\n","Requirement already satisfied: rich in /usr/local/lib/python3.10/dist-packages (from meshio) (13.7.1)\n","Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich->meshio) (3.0.0)\n","Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich->meshio) (2.16.1)\n","Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich->meshio) (0.1.2)\n","Installing collected packages: meshio\n","Successfully installed meshio-5.3.5\n","Collecting open3d\n","  Downloading open3d-0.18.0-cp310-cp310-manylinux_2_27_x86_64.whl (399.7 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m399.7/399.7 MB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: numpy>=1.18.0 in /usr/local/lib/python3.10/dist-packages (from open3d) (1.25.2)\n","Collecting dash>=2.6.0 (from open3d)\n","  Downloading dash-2.17.1-py3-none-any.whl (7.5 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.5/7.5 MB\u001b[0m \u001b[31m51.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: werkzeug>=2.2.3 in /usr/local/lib/python3.10/dist-packages (from open3d) (3.0.3)\n","Requirement already satisfied: nbformat>=5.7.0 in /usr/local/lib/python3.10/dist-packages (from open3d) (5.10.4)\n","Collecting configargparse (from open3d)\n","  Downloading ConfigArgParse-1.7-py3-none-any.whl (25 kB)\n","Collecting ipywidgets>=8.0.4 (from open3d)\n","  Downloading ipywidgets-8.1.3-py3-none-any.whl (139 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m139.4/139.4 kB\u001b[0m \u001b[31m21.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting addict (from open3d)\n","  Downloading addict-2.4.0-py3-none-any.whl (3.8 kB)\n","Requirement already satisfied: pillow>=9.3.0 in /usr/local/lib/python3.10/dist-packages (from open3d) (9.4.0)\n","Requirement already satisfied: matplotlib>=3 in /usr/local/lib/python3.10/dist-packages (from open3d) (3.7.1)\n","Requirement already satisfied: pandas>=1.0 in /usr/local/lib/python3.10/dist-packages (from open3d) (2.0.3)\n","Requirement already satisfied: pyyaml>=5.4.1 in /usr/local/lib/python3.10/dist-packages (from open3d) (6.0.1)\n","Requirement already satisfied: scikit-learn>=0.21 in /usr/local/lib/python3.10/dist-packages (from open3d) (1.2.2)\n","Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from open3d) (4.66.4)\n","Collecting pyquaternion (from open3d)\n","  Downloading pyquaternion-0.9.9-py3-none-any.whl (14 kB)\n","Requirement already satisfied: Flask<3.1,>=1.0.4 in /usr/local/lib/python3.10/dist-packages (from dash>=2.6.0->open3d) (2.2.5)\n","Requirement already satisfied: plotly>=5.0.0 in /usr/local/lib/python3.10/dist-packages (from dash>=2.6.0->open3d) (5.15.0)\n","Collecting dash-html-components==2.0.0 (from dash>=2.6.0->open3d)\n","  Downloading dash_html_components-2.0.0-py3-none-any.whl (4.1 kB)\n","Collecting dash-core-components==2.0.0 (from dash>=2.6.0->open3d)\n","  Downloading dash_core_components-2.0.0-py3-none-any.whl (3.8 kB)\n","Collecting dash-table==5.0.0 (from dash>=2.6.0->open3d)\n","  Downloading dash_table-5.0.0-py3-none-any.whl (3.9 kB)\n","Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.10/dist-packages (from dash>=2.6.0->open3d) (8.0.0)\n","Requirement already satisfied: typing-extensions>=4.1.1 in /usr/local/lib/python3.10/dist-packages (from dash>=2.6.0->open3d) (4.12.2)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from dash>=2.6.0->open3d) (2.31.0)\n","Collecting retrying (from dash>=2.6.0->open3d)\n","  Downloading retrying-1.3.4-py3-none-any.whl (11 kB)\n","Requirement already satisfied: nest-asyncio in /usr/local/lib/python3.10/dist-packages (from dash>=2.6.0->open3d) (1.6.0)\n","Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from dash>=2.6.0->open3d) (67.7.2)\n","Collecting comm>=0.1.3 (from ipywidgets>=8.0.4->open3d)\n","  Downloading comm-0.2.2-py3-none-any.whl (7.2 kB)\n","Requirement already satisfied: ipython>=6.1.0 in /usr/local/lib/python3.10/dist-packages (from ipywidgets>=8.0.4->open3d) (7.34.0)\n","Requirement already satisfied: traitlets>=4.3.1 in /usr/local/lib/python3.10/dist-packages (from ipywidgets>=8.0.4->open3d) (5.7.1)\n","Collecting widgetsnbextension~=4.0.11 (from ipywidgets>=8.0.4->open3d)\n","  Downloading widgetsnbextension-4.0.11-py3-none-any.whl (2.3 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.3/2.3 MB\u001b[0m \u001b[31m64.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: jupyterlab-widgets~=3.0.11 in /usr/local/lib/python3.10/dist-packages (from ipywidgets>=8.0.4->open3d) (3.0.11)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3->open3d) (1.2.1)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3->open3d) (0.12.1)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3->open3d) (4.53.1)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3->open3d) (1.4.5)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3->open3d) (24.1)\n","Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3->open3d) (3.1.2)\n","Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3->open3d) (2.8.2)\n","Requirement already satisfied: fastjsonschema>=2.15 in /usr/local/lib/python3.10/dist-packages (from nbformat>=5.7.0->open3d) (2.20.0)\n","Requirement already satisfied: jsonschema>=2.6 in /usr/local/lib/python3.10/dist-packages (from nbformat>=5.7.0->open3d) (4.19.2)\n","Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /usr/local/lib/python3.10/dist-packages (from nbformat>=5.7.0->open3d) (5.7.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.0->open3d) (2023.4)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.0->open3d) (2024.1)\n","Requirement already satisfied: scipy>=1.3.2 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.21->open3d) (1.11.4)\n","Requirement already satisfied: joblib>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.21->open3d) (1.4.2)\n","Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.21->open3d) (3.5.0)\n","Requirement already satisfied: MarkupSafe>=2.1.1 in /usr/local/lib/python3.10/dist-packages (from werkzeug>=2.2.3->open3d) (2.1.5)\n","Requirement already satisfied: Jinja2>=3.0 in /usr/local/lib/python3.10/dist-packages (from Flask<3.1,>=1.0.4->dash>=2.6.0->open3d) (3.1.4)\n","Requirement already satisfied: itsdangerous>=2.0 in /usr/local/lib/python3.10/dist-packages (from Flask<3.1,>=1.0.4->dash>=2.6.0->open3d) (2.2.0)\n","Requirement already satisfied: click>=8.0 in /usr/local/lib/python3.10/dist-packages (from Flask<3.1,>=1.0.4->dash>=2.6.0->open3d) (8.1.7)\n","Collecting jedi>=0.16 (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d)\n","  Downloading jedi-0.19.1-py2.py3-none-any.whl (1.6 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m64.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (4.4.2)\n","Requirement already satisfied: pickleshare in /usr/local/lib/python3.10/dist-packages (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (0.7.5)\n","Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (3.0.47)\n","Requirement already satisfied: pygments in /usr/local/lib/python3.10/dist-packages (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (2.16.1)\n","Requirement already satisfied: backcall in /usr/local/lib/python3.10/dist-packages (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (0.2.0)\n","Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (0.1.7)\n","Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (4.9.0)\n","Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat>=5.7.0->open3d) (23.2.0)\n","Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat>=5.7.0->open3d) (2023.12.1)\n","Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat>=5.7.0->open3d) (0.35.1)\n","Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat>=5.7.0->open3d) (0.19.0)\n","Requirement already satisfied: platformdirs>=2.5 in /usr/local/lib/python3.10/dist-packages (from jupyter-core!=5.0.*,>=4.12->nbformat>=5.7.0->open3d) (4.2.2)\n","Requirement already satisfied: tenacity>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from plotly>=5.0.0->dash>=2.6.0->open3d) (8.5.0)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib>=3->open3d) (1.16.0)\n","Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata->dash>=2.6.0->open3d) (3.19.2)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->dash>=2.6.0->open3d) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->dash>=2.6.0->open3d) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->dash>=2.6.0->open3d) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->dash>=2.6.0->open3d) (2024.7.4)\n","Requirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (0.8.4)\n","Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect>4.3->ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (0.7.0)\n","Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=6.1.0->ipywidgets>=8.0.4->open3d) (0.2.13)\n","Installing collected packages: dash-table, dash-html-components, dash-core-components, addict, widgetsnbextension, retrying, pyquaternion, jedi, configargparse, comm, ipywidgets, dash, open3d\n","  Attempting uninstall: widgetsnbextension\n","    Found existing installation: widgetsnbextension 3.6.7\n","    Uninstalling widgetsnbextension-3.6.7:\n","      Successfully uninstalled widgetsnbextension-3.6.7\n","  Attempting uninstall: ipywidgets\n","    Found existing installation: ipywidgets 7.7.1\n","    Uninstalling ipywidgets-7.7.1:\n","      Successfully uninstalled ipywidgets-7.7.1\n","Successfully installed addict-2.4.0 comm-0.2.2 configargparse-1.7 dash-2.17.1 dash-core-components-2.0.0 dash-html-components-2.0.0 dash-table-5.0.0 ipywidgets-8.1.3 jedi-0.19.1 open3d-0.18.0 pyquaternion-0.9.9 retrying-1.3.4 widgetsnbextension-4.0.11\n","Collecting einops\n","  Downloading einops-0.8.0-py3-none-any.whl (43 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m43.2/43.2 kB\u001b[0m \u001b[31m2.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hInstalling collected packages: einops\n","Successfully installed einops-0.8.0\n","Collecting paddlepaddle\n","  Downloading paddlepaddle-2.6.1-cp310-cp310-manylinux1_x86_64.whl (125.9 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m125.9/125.9 MB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting httpx (from paddlepaddle)\n","  Downloading httpx-0.27.0-py3-none-any.whl (75 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m13.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: numpy>=1.13 in /usr/local/lib/python3.10/dist-packages (from paddlepaddle) (1.25.2)\n","Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from paddlepaddle) (9.4.0)\n","Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from paddlepaddle) (4.4.2)\n","Collecting astor (from paddlepaddle)\n","  Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)\n","Requirement already satisfied: opt-einsum==3.3.0 in /usr/local/lib/python3.10/dist-packages (from paddlepaddle) (3.3.0)\n","Requirement already satisfied: protobuf>=3.20.2 in /usr/local/lib/python3.10/dist-packages (from paddlepaddle) (3.20.3)\n","Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx->paddlepaddle) (3.7.1)\n","Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx->paddlepaddle) (2024.7.4)\n","Collecting httpcore==1.* (from httpx->paddlepaddle)\n","  Downloading httpcore-1.0.5-py3-none-any.whl (77 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx->paddlepaddle) (3.7)\n","Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->paddlepaddle) (1.3.1)\n","Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx->paddlepaddle)\n","  Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->httpx->paddlepaddle) (1.2.1)\n","Installing collected packages: h11, astor, httpcore, httpx, paddlepaddle\n","Successfully installed astor-0.8.1 h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 paddlepaddle-2.6.1\n","Collecting timm\n","  Downloading timm-1.0.7-py3-none-any.whl (2.3 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.3/2.3 MB\u001b[0m \u001b[31m37.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from timm) (2.3.0+cu121)\n","Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from timm) (0.18.0+cu121)\n","Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from timm) (6.0.1)\n","Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (from timm) (0.23.4)\n","Requirement already satisfied: safetensors in /usr/local/lib/python3.10/dist-packages (from timm) (0.4.3)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (3.15.4)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (2023.6.0)\n","Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (24.1)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (2.31.0)\n","Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (4.66.4)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (4.12.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->timm) (1.13.0)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->timm) (3.3)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (3.1.4)\n","Collecting nvidia-cuda-nvrtc-cu12==12.1.105 (from torch->timm)\n","  Using cached nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (23.7 MB)\n","Collecting nvidia-cuda-runtime-cu12==12.1.105 (from torch->timm)\n","  Using cached nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (823 kB)\n","Collecting nvidia-cuda-cupti-cu12==12.1.105 (from torch->timm)\n","  Using cached nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (14.1 MB)\n","Collecting nvidia-cudnn-cu12==8.9.2.26 (from torch->timm)\n","  Using cached nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl (731.7 MB)\n","Collecting nvidia-cublas-cu12==12.1.3.1 (from torch->timm)\n","  Using cached nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl (410.6 MB)\n","Collecting nvidia-cufft-cu12==11.0.2.54 (from torch->timm)\n","  Using cached nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl (121.6 MB)\n","Collecting nvidia-curand-cu12==10.3.2.106 (from torch->timm)\n","  Using cached nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl (56.5 MB)\n","Collecting nvidia-cusolver-cu12==11.4.5.107 (from torch->timm)\n","  Using cached nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl (124.2 MB)\n","Collecting nvidia-cusparse-cu12==12.1.0.106 (from torch->timm)\n","  Using cached nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl (196.0 MB)\n","Collecting nvidia-nccl-cu12==2.20.5 (from torch->timm)\n","  Using cached nvidia_nccl_cu12-2.20.5-py3-none-manylinux2014_x86_64.whl (176.2 MB)\n","Collecting nvidia-nvtx-cu12==12.1.105 (from torch->timm)\n","  Using cached nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (99 kB)\n","Requirement already satisfied: triton==2.3.0 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (2.3.0)\n","Collecting nvidia-nvjitlink-cu12 (from nvidia-cusolver-cu12==11.4.5.107->torch->timm)\n","  Downloading nvidia_nvjitlink_cu12-12.5.82-py3-none-manylinux2014_x86_64.whl (21.3 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.3/21.3 MB\u001b[0m \u001b[31m73.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from torchvision->timm) (1.25.2)\n","Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.10/dist-packages (from torchvision->timm) (9.4.0)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->timm) (2.1.5)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (2024.7.4)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->timm) (1.3.0)\n","Installing collected packages: nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, nvidia-cusparse-cu12, nvidia-cudnn-cu12, nvidia-cusolver-cu12, timm\n","Successfully installed nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-8.9.2.26 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.20.5 nvidia-nvjitlink-cu12-12.5.82 nvidia-nvtx-cu12-12.1.105 timm-1.0.7\n","Collecting spconv\n","  Downloading spconv-2.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting pccm>=0.4.0 (from spconv)\n","  Downloading pccm-0.4.11-py3-none-any.whl (71 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.5/71.5 kB\u001b[0m \u001b[31m10.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting ccimport>=0.4.0 (from spconv)\n","  Downloading ccimport-0.4.2-py3-none-any.whl (27 kB)\n","Collecting pybind11>=2.6.0 (from spconv)\n","  Downloading pybind11-2.13.1-py3-none-any.whl (238 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m238.8/238.8 kB\u001b[0m \u001b[31m13.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting fire (from spconv)\n","  Downloading fire-0.6.0.tar.gz (88 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m88.4/88.4 kB\u001b[0m \u001b[31m12.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n","Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from spconv) (1.25.2)\n","Collecting cumm<0.5.0,>=0.4.5 (from spconv)\n","  Downloading cumm-0.4.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.5/2.5 MB\u001b[0m \u001b[31m21.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting ninja (from ccimport>=0.4.0->spconv)\n","  Downloading ninja-1.11.1.1-py2.py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl (307 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.2/307.2 kB\u001b[0m \u001b[31m20.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from ccimport>=0.4.0->spconv) (2.31.0)\n","Collecting lark>=1.0.0 (from pccm>=0.4.0->spconv)\n","  Downloading lark-1.1.9-py3-none-any.whl (111 kB)\n","\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m111.7/111.7 kB\u001b[0m \u001b[31m14.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hCollecting portalocker>=2.3.2 (from pccm>=0.4.0->spconv)\n","  Downloading portalocker-2.10.1-py3-none-any.whl (18 kB)\n","Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from fire->spconv) (1.16.0)\n","Requirement already satisfied: termcolor in /usr/local/lib/python3.10/dist-packages (from fire->spconv) (2.4.0)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->ccimport>=0.4.0->spconv) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->ccimport>=0.4.0->spconv) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->ccimport>=0.4.0->spconv) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->ccimport>=0.4.0->spconv) (2024.7.4)\n","Building wheels for collected packages: fire\n","  Building wheel for fire (setup.py) ... \u001b[?25l\u001b[?25hdone\n","  Created wheel for fire: filename=fire-0.6.0-py2.py3-none-any.whl size=117029 sha256=f0d38f2295d3728090912a61ce80fc3f3585a0133bc8f98395d977de77d3eeaa\n","  Stored in directory: /root/.cache/pip/wheels/d6/6d/5d/5b73fa0f46d01a793713f8859201361e9e581ced8c75e5c6a3\n","Successfully built fire\n","Installing collected packages: ninja, pybind11, portalocker, lark, fire, ccimport, pccm, cumm, spconv\n","Successfully installed ccimport-0.4.2 cumm-0.4.11 fire-0.6.0 lark-1.1.9 ninja-1.11.1.1 pccm-0.4.11 portalocker-2.10.1 pybind11-2.13.1 spconv-2.3.6\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (2.31.0)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests) (2024.7.4)\n"]}]},{"cell_type":"code","source":["import sys\n","sys.path.append(\"code_A/code_track_A/model\")\n","\n","import re\n","import meshio\n","import os\n","import yaml\n","import shutil\n","import torch\n","import torch.nn as nn\n","import torch.nn.functional as F\n","import numpy as np\n","import pandas as pd\n","import open3d as o3d\n","import matplotlib.pyplot as plt\n","\n","from matplotlib import rcParams\n","from timeit import default_timer\n","from einops import rearrange\n","from src.utils.utils import dict2namespace, LpLoss, count_params\n","from src.data.cfd_datamodule import CFDDataModule\n","from src.networks.Transolver import Model\n","from src.networks.PTV3 import Point\n","from torch.utils.data import TensorDataset, DataLoader\n","from torch.nn.init import xavier_uniform_\n","\n","def set_random_seed(seed):\n","    np.random.seed(seed)\n","    torch.manual_seed(seed)\n","    torch.cuda.manual_seed(seed)\n","    torch.cuda.manual_seed_all(seed)\n","\n","set_random_seed(1234)"],"metadata":{"id":"flM5mKGIq1-4"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## 直接导入(建议)"],"metadata":{"id":"_Mh7pXUyYOvl"}},{"cell_type":"code","source":["# !pip install"],"metadata":{"id":"XLNZMxywPYe1","collapsed":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## 通过requirements.txt一次性导入"],"metadata":{"id":"sRLfyacGYGcY"}},{"cell_type":"code","source":["###或者通过requirement导入，requirements需要在B.zip压缩包默认路径下\n","# !pip install -r requirements.txt"],"metadata":{"id":"08ZsNhl5YFkj"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":[],"metadata":{"id":"tysV33RQq0fK"}},{"cell_type":"markdown","source":["# 额外数据导入\n","（此处导入权重文件和额外数据集，在此之外的导入将有被判违规的风险，这里以导入随机生成的Track C的A榜样例提交的zip为例子）"],"metadata":{"id":"DUxmPjWWV1sr"}},{"cell_type":"markdown","source":["赛道一额外数据下载链接：https://drive.google.com/file/d/1Vb740MGw7dMN943bRTNvy_f_qFMB9sjX/view?usp=sharing\n","\n","论文：Li, Zongyi, et al. \"Geometry-informed neural operator for large-scale 3d pdes.\" Advances in Neural Information Processing Systems 36 (2024).\n","\n","说明：原始论文数据含798个样本，比赛官方抽取了其中500个作为训练集，50个作为测试集，我们排除了这550个数据，使用剩下的248个样本作为额外数据，未踩到测试集"],"metadata":{"id":"8ZswFmParE-o"}},{"cell_type":"code","source":["###################### data ######################\n","file_id = '13kPNzk4oGrNTEEFR3I_mbcwgcjGHi1-Y' # 文件ID\n","destination = '/Dataset.zip' # 文件下载路径\n","download_url = f'https://drive.google.com/uc?id={file_id}' # 构建下载URL\n","if not os.path.exists(destination):\n","  gdown.download(download_url, destination, quiet=False) # 下载文件\n","\n","zip_file_path = destination # 压缩文件路径\n","extract_directory = '/content/Dataset' # 解压目录\n","unzip_file(zip_file_path, extract_directory)"],"metadata":{"id":"s-1jJFl6rCVo","executionInfo":{"status":"ok","timestamp":1721013542545,"user_tz":-480,"elapsed":13771,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"04c5cfec-feac-4b0f-fe83-92031a9a2482","colab":{"base_uri":"https://localhost:8080/"}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["Downloading...\n","From (original): https://drive.google.com/uc?id=13kPNzk4oGrNTEEFR3I_mbcwgcjGHi1-Y\n","From (redirected): https://drive.google.com/uc?id=13kPNzk4oGrNTEEFR3I_mbcwgcjGHi1-Y&confirm=t&uuid=fe310a5a-380f-413f-86a3-3fd27973a506\n","To: /Dataset.zip\n","100%|██████████| 192M/192M [00:02<00:00, 82.0MB/s]\n"]}]},{"cell_type":"code","source":["# !pip install gdown\n","# import gdown\n","# !wget -P /content/train_track_B_e/press/  --user-agent=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36\" https://drive.google.com/uc?export=download&id=1fED8VAaC8QyL2AUCCAaq39WFLh7PanNH\n","# !wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1fED8VAaC8QyL2AUCCAaq39WFLh7PanNH' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p'\n","# !wget --load-cookies cookies.txt \"https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1fED8VAaC8QyL2AUCCAaq39WFLh7PanNH' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p')&id=1fED8VAaC8QyL2AUCCAaq39WFLh7PanNH\" -O press.zip && rm -rf /tmp/cookies.txt\n","# --header=\"Host: drive.usercontent.google.com\"\n","# --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36\"\n","# --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh,zh-CN;q=0.9,en;q=0.8\" --header=\"Cookie: AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzkuJRXpDLmC_XxoVAUF8yKpkSuSLMm7wN8kPiklDLWpD0076; __Secure-1PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7eTxKEPCbtKJP-WpB0sS7IwACgYKAQ0SARYSFQHGX2MimRYfxLjZZnsSbRUyLnXj-xoVAUF8yKpK6mH60avbvj7dWu_Wtvny0076; __Secure-3PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7uXG5Vbh6OrUmdFmX1D1k3gACgYKAWMSARYSFQHGX2MiFsS_t8MOTqmRAcbHsxqG8RoVAUF8yKp0GCuI4xnwYrlT9L1pS6Ol0076; HSID=Ak0_J4cMdWxYYLsNT; SSID=AIMT0qtQWmO9_ImAP; APISID=h9-r_ylvYL8SAAMr/A-iHpJeO9Apsuge6w; SAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-1PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-3PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; S=billing-ui-v3=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL:billing-ui-v3-efe=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL; __Secure-1PSIDTS=sidts-CjEB4E2dkTePrvGZ34Uqd-fiwJVuKQfsKn-m0FkRIk67VXXobf9pe45X49TD9mxOTck4EAA; __Secure-3PSIDTS=sidts-CjEB4E2dkTePrvGZ34Uqd-fiwJVuKQfsKn-m0FkRIk67VXXobf9pe45X49TD9mxOTck4EAA; NID=515=NM4LfLVBoYJ9i81Kc-NBiwctEbhMRSl5wmR6n307UZGSzQGEMmfjGt37rGvWmr0kpME0asDPCVyOzRzWOQAE6tAeXOUlI-t456WBIvImfRgmWWMOsHrakcWQkh6tJpukjL302wlmwg58aKKzGf0A9FLjP_8ICtkhzJyPGNP9-UrXbObciHjanJe9QQ7HUQWK6o-ykNOyEMQdYRUyxuAiUNGs-J8CYs_FMGoehXTFhvCDRwk6BJc5fAFm7UJP6rqztlNPRsJwt04Zd3Gvhd_flNhUeLCSR8ZHFzeAbO4805TE9uuSCcny3CLGv9zsEsfbDtZEAGfDY8EzT_xm7jr7jzOts146k2NvdI2RvHJww81i_fz7uI494PwzXUgAKH4yM1ja9fZjwApQVPs0y17j-DzJoToC50bYt7DR4HpQK6on2AOu4q16ve9wyP0RDDNHfP9USVLb36gOCqfNU9At6EqTpXSJntuJOdCrF0IkO324uDeByiXpRDeDWTuFOuaD48lp0Gj91REUikYIEgsSL1De2Zrml_UCEYJrYUaRYvwZBkGpBJeb9rCVp-oipGOkSZ3ATKaIMOpviqPQEefRiK5xPf91m3eFcT4u-kRUuCIYmlZaP_fXXFPh459B6eYmhRwSAPwSZe1BczwQy9fAo6R_ZxrZKR-QHQvnJ9BOsuIvLNdygZCVWAdJji1wQp4BPxyRpHI1zwblH7vT7MDk_nQ6dcFnK-JNQM-ss4v8LQ_t7zzwg-cAOkNpek9wGSaLxAx9un2nY9bJpP9xkT5FrJjQfpQ7631XXdZP9YrTfJeM30_Cwk8HjeCa0A14Y7e3sDlCQFSEWKjsgvVKtZQPVU-dT4qy2hZku2m6xn6bqDCJ4S51qavae8ciYHJ5u06-kxoH9H2sPBkGHmNxl4uqa4E4LNG2cmK0OP0hSC_lIvPL1jMlTN9NPoI17U6Pk6z4uEa-rwZGaBc3tw0xCgZ5aNw9LHniHxefjXWFyEYuOXbtItfKYwe3KlBYHyPjX1WFvOifr99tnvKwwR-LFmTJ0_J6HzsUfXCQ6hBXfr7inmrRn8BBin-4NLpRKKUJTrE615Ltf7Rt_duO7XtInAeASNce9hyN3aB2sFD5gmEiHlXAxO1oEiuYbmBCBE3p-5pqJ994EzbTJd3_QQ; SIDCC=AKEyXzWUXvaLxcEWoUr7xDsHNqI9YlS2B0CD4n3sQW20AEbXjfwUamDojGOHRk_EUx-eeHbEAw; __Secure-1PSIDCC=AKEyXzWnzBM9s4vVnoJOnyQ6Am5ICp50PfclBvvvp2ftfri0PlYsvEF8X56Y-xoGbSgl-p7lIA; __Secure-3PSIDCC=AKEyXzWnlf6Wa8I0Hck8U3WeLdJ1nbz2W9cNUupMH0BW6wH57dNls4LLysU7cghw22IvvZKdIG8\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Cookie: __Secure-ENID=12.SE=Yd0Bj-CLJ14fnd4qzdJHmwUs4B5zz46UaPC1cPJigNqqFV9PtM2CYyBpSbCkOyzUwzlEdZ1nZFf-igtGi7wSdJ_gqQSfQfh84r9egqFQAy9-GKayCRbdQKdera-2mkpuIT-c64CyR9vfNojM3hxZ9Dej-dGvtxlGjal9ttEHybw; __gsas=ID=ae0421b9a34b478c:T=1710758437:RT=1710758437:S=ALNI_MZP13R9ZOHbCzC0rgHSMrGXj6GCsg; HSID=A-4I-ZudDNUIB6EKH; SSID=A7v_1v9un6xAwVNku; APISID=ctK8IbLjeuDUmgys/AFnMSLWt9KddceDI6; SAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; __Secure-1PAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; __Secure-3PAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; SID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_kzuBV1TvOhAIC8VF1e9fpgACgYKATQSARQSFQHGX2Mi8LXUwWoIwNCEPU8Sy3mXUxoVAUF8yKqGXVfjTGz9gQal7nwGr4Pl0076; __Secure-1PSID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_PDa-DzVmbdGFPyxMQpk9_QACgYKAewSARQSFQHGX2MiAeee4fn0OWglWZfAygqkyBoVAUF8yKp-Sfmtnueimxc-0QbJRF9I0076; __Secure-3PSID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_g9IrMeU98APBo9Stp6wEnAACgYKAQASARQSFQHGX2MiFWtc9ucONXnpxBzlRdudEhoVAUF8yKoeZwCpJDnjfAFjGssHSUGm0076; NID=515=GQhY9nKKFCx3qFDjE0MA4ubjWNdef6xCIY_RfWOPWKEtyfBN3nAUl8WHI2VczjNQ4rVkj1XBAY8WNWHXyqSK10CfT4FxsFlPzrHIJpeTtm1nWRNBd9AAfBKJHz4XpESszntVUTE_59RklZuKo0vk1poReVi2da1PZKC3CTKH2Ll3gB5xuB9wf4bmq8ylVUuIROPJczr0XnCuUHV3qLdBvgy9_870b6UwOq1iOlIxFQFm01EZ4pqF4q1Ub3QRSWpEMLh4LSZFpJ5O255R5OV7krmEdDvH_sHoTEPZAg2PoEpwAyGK6Xp9qcLIlldgx5-5V86N8Wtb93uTlQuA_CFXb5_2eP3bgeX8txwlJ5SrldVjg9ctzYtBU2RwJKTSvdHfIG7lpOkg6XlkvDOcJpR3DihT_OlqnPn7drCAJpvVDv29hZn5XPMXaSrNdbG64OJ9urJEw5odEwsLYkkpC1vmlUcuoo52S5f6RQu0Z8kZiV8iRW6XIqHsSmQHunVaxk6xWCStUg; __Secure-1PSIDTS=sidts-CjEB3EgAEtTS0OazynCofIH4RCBstiRP5flEcvYW3z4Fg9oGd5QOESDOZt1wO2iqUYHjEAA; __Secure-3PSIDTS=sidts-CjEB3EgAEtTS0OazynCofIH4RCBstiRP5flEcvYW3z4Fg9oGd5QOESDOZt1wO2iqUYHjEAA; SIDCC=AKEyXzVI6aMX8lSDja86Yts3FBAtBzPCzVNgaX5BCz78NWsWzlT3yFWKUV7ZE46SFzE1GiBI-cHdTw; __Secure-1PSIDCC=AKEyXzUo4NQAwqqPMxP2eye-MFEbZmBIm_sZqRU1amttg0YoQkc8ZKSNXdHl5jNCMEbhrUHhS9-K; __Secure-3PSIDCC=AKEyXzWf2lIdmDLeZKpXSi9GytVQb6XudrYiNUBA5gW952YuLh8kL6T3IbBlu8zOTfGEcdUp5O1R\" --header=\"Connection: keep-alive\" \"https://drive.usercontent.google.com/download?id=1W0jmrRX11DnRqU4QvGMlWFSlcItyeh0R&export=download&authuser=0&confirm=t&uuid=615334ea-9569-476f-8bb4-727516c76591&at=APZUnTWDW32examprS0NvVx3_v7o%3A1720881303406\"\n","# !wget --header=\"Host: drive.usercontent.google.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36\" --header=\"Cookie: AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzkuJRXpDLmC_XxoVAUF8yKpkSuSLMm7wN8kPiklDLWpD0076; __Secure-1PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7eTxKEPCbtKJP-WpB0sS7IwACgYKAQ0SARYSFQHGX2MimRYfxLjZZnsSbRUyLnXj-xoVAUF8yKpK6mH60avbvj7dWu_Wtvny0076; __Secure-3PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7uXG5Vbh6OrUmdFmX1D1k3gACgYKAWMSARYSFQHGX2MiFsS_t8MOTqmRAcbHsxqG8RoVAUF8yKp0GCuI4xnwYrlT9L1pS6Ol0076; HSID=Ak0_J4cMdWxYYLsNT; SSID=AIMT0qtQWmO9_ImAP; APISID=h9-r_ylvYL8SAAMr/A-iHpJeO9Apsuge6w; SAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-1PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-3PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; S=billing-ui-v3=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL:billing-ui-v3-efe=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL; __Secure-1PSIDTS=sidts-CjEB4E2dkTePrvGZ34Uqd-fiwJVuKQfsKn-m0FkRIk67VXXobf9pe45X49TD9mxOTck4EAA; __Secure-3PSIDTS=sidts-CjEB4E2dkTePrvGZ34Uqd-fiwJVuKQfsKn-m0FkRIk67VXXobf9pe45X49TD9mxOTck4EAA; NID=515=NM4LfLVBoYJ9i81Kc-NBiwctEbhMRSl5wmR6n307UZGSzQGEMmfjGt37rGvWmr0kpME0asDPCVyOzRzWOQAE6tAeXOUlI-t456WBIvImfRgmWWMOsH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7xDsHNqI9YlS2B0CD4n3sQW20AEbXjfwUamDojGOHRk_EUx-eeHbEAw; __Secure-1PSIDCC=AKEyXzWnzBM9s4vVnoJOnyQ6Am5ICp50PfclBvvvp2ftfri0PlYsvEF8X56Y-xoGbSgl-p7lIA; __Secure-3PSIDCC=AKEyXzWnlf6Wa8I0Hck8U3WeLdJ1nbz2W9cNUupMH0BW6wH57dNls4LLysU7cghw22IvvZKdIG8\"  --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\"  --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\"  --header=\"Connection: keep-alive\" \"https://drive.usercontent.google.com/download?id=1W0jmrRX11DnRqU4QvGMlWFSlcItyeh0R&export=download&authuser=0&confirm=t&uuid=23a03d1a-abc8-42c8-b2e9-ac15544ce09b&at=APZUnTUcKjp9S2N1MeUHjjEMQv8Z%3A1720882064537\"  -c -O 'centroid_3.zip'\n","\n","# !wget --header=\"Host: drive.usercontent.google.com\" --header=\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh,zh-CN;q=0.9,en;q=0.8\" --header=\"Cookie: AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzkuJRXpDLmC_XxoVAUF8yKpkSuSLMm7wN8kPiklDLWpD0076; __Secure-1PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7eTxKEPCbtKJP-WpB0sS7IwACgYKAQ0SARYSFQHGX2MimRYfxLjZZnsSbRUyLnXj-xoVAUF8yKpK6mH60avbvj7dWu_Wtvny0076; __Secure-3PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7uXG5Vbh6OrUmdFmX1D1k3gACgYKAWMSARYSFQHGX2MiFsS_t8MOTqmRAcbHsxqG8RoVAUF8yKp0GCuI4xnwYrlT9L1pS6Ol0076; HSID=Ak0_J4cMdWxYYLsNT; SSID=AIMT0qtQWmO9_ImAP; APISID=h9-r_ylvYL8SAAMr/A-iHpJeO9Apsuge6w; SAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-1PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-3PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; S=billing-ui-v3=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL:billing-ui-v3-efe=bUPMkFOb_-XdG1QunQWLPvT97nV4ggJL; __Secure-1PSIDTS=sidts-CjEB4E2dkTePrvGZ34Uqd-fiwJVuKQfsKn-m0FkRIk67VXXobf9pe45X49TD9mxOTck4EAA; __Secure-3PSIDTS=sidts-CjEB4E2dkTePrvGZ34Uqd-fiwJVuKQfsKn-m0FkRIk67VXXobf9pe45X49TD9mxOTck4EAA; NID=515=NM4LfLVBoYJ9i81Kc-NBiwctEbhMRSl5wmR6n307UZGSzQGEMmfjGt37rGvWmr0kpME0asDPCVyOzRzWOQAE6tAeXOUlI-t456WBIvImfRgmWWMOsHrakcWQkh6tJpukjL302wlmwg58aKKzGf0A9FLjP_8ICtkhzJyPGNP9-UrXbObciHjanJe9QQ7HUQWK6o-ykNOyEMQdYRUyxuAiUNGs-J8CYs_FMGoehXTFhvCDRwk6BJc5fAFm7UJP6rqztlNPRsJwt04Zd3Gvhd_flNhUeLCSR8ZHFze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Hck8U3WeLdJ1nbz2W9cNUupMH0BW6wH57dNls4LLysU7cghw22IvvZKdIG8\" --header=\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\" --header=\"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6\" --header=\"Cookie: __Secure-ENID=12.SE=Yd0Bj-CLJ14fnd4qzdJHmwUs4B5zz46UaPC1cPJigNqqFV9PtM2CYyBpSbCkOyzUwzlEdZ1nZFf-igtGi7wSdJ_gqQSfQfh84r9egqFQAy9-GKayCRbdQKdera-2mkpuIT-c64CyR9vfNojM3hxZ9Dej-dGvtxlGjal9ttEHybw; __gsas=ID=ae0421b9a34b478c:T=1710758437:RT=1710758437:S=ALNI_MZP13R9ZOHbCzC0rgHSMrGXj6GCsg; HSID=A-4I-ZudDNUIB6EKH; SSID=A7v_1v9un6xAwVNku; APISID=ctK8IbLjeuDUmgys/AFnMSLWt9KddceDI6; SAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; __Secure-1PAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; __Secure-3PAPISID=J7GhTwED67EBqJJT/A9nwK7mr0ijGPw08r; SID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_kzuBV1TvOhAIC8VF1e9fpgACgYKATQSARQSFQHGX2Mi8LXUwWoIwNCEPU8Sy3mXUxoVAUF8yKqGXVfjTGz9gQal7nwGr4Pl0076; __Secure-1PSID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_PDa-DzVmbdGFPyxMQpk9_QACgYKAewSARQSFQHGX2MiAeee4fn0OWglWZfAygqkyBoVAUF8yKp-Sfmtnueimxc-0QbJRF9I0076; __Secure-3PSID=g.a000kgiBabgKCiCYKve9zfoWVgz9eu8sBA6N4XDPPpP5pcW16_C_g9IrMeU98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\"https://drive.usercontent.google.com/download?id=1W0jmrRX11DnRqU4QvGMlWFSlcItyeh0R&export=download&authuser=0&confirm=t&uuid=615334ea-9569-476f-8bb4-727516c76591&at=APZUnTWDW32examprS0NvVx3_v7o%3A1720881303406\" -c -O 'centroid_3.zip'"],"metadata":{"id":"H8YjMlYcYmei","collapsed":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["赛道二额外数据来源于：https://github.com/Mohamedelrefaie/DrivAerNet\n","\n","赛道二额外数据的论文：Elrefaie, Mohamed, Angela Dai, and Faez Ahmed. \"Drivaernet: A parametric car dataset for data-driven aerodynamic design and graph-based drag prediction.\" arXiv preprint arXiv:2403.08055 (2024).\n","\n","**额外数据排除测试集：额外数据中仅使用了id>745的数据，未使用比赛测试数据，共计3711条数据。**"],"metadata":{"id":"wDM42uay7X8A"}},{"cell_type":"code","source":["# !curl 'https://drive.usercontent.google.com/download?id=1zEL0a_o0DBuSzRncgtxtkrFCPiegZqJd&export=download&authuser=1&confirm=t&uuid=de6a7a42-a8af-443a-b898-9398d48cfa75&at=APZUnTX1g4bphkFrntcrLY-h76YG:1721012003442' \\\n","#   -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \\\n","#   -H 'accept-language: zh,zh-CN;q=0.9,en;q=0.8' \\\n","#   -H 'cookie: SEARCH_SAMESITE=CgQIzJsB; AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzkuJRXpDLmC_XxoVAUF8yKpkSuSLMm7wN8kPiklDLWpD0076; __Secure-1PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7eTxKEPCbtKJP-WpB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Z3129Zx2bO7RnqY_14szUeiLRrfU4cY-8' \\\n","#   -H 'priority: u=0, i' \\\n","#   -H 'sec-ch-ua: \"Google Chrome\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"' \\\n","#   -H 'sec-ch-ua-mobile: ?0' \\\n","#   -H 'sec-ch-ua-platform: \"Windows\"' \\\n","#   -H 'sec-fetch-dest: iframe' \\\n","#   -H 'sec-fetch-mode: navigate' \\\n","#   -H 'sec-fetch-site: same-site' \\\n","#   -H 'upgrade-insecure-requests: 1' \\\n","#   -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \\\n","#   -H 'x-client-data: CKy1yQEIlbbJAQiitskBCKmdygEItoHLAQiSocsBCIWgzQEIuMjNAQimis4BCOKTzgEI6JPOAQjum84BCJWdzgEIxZ3OAQiyn84BGPXJzQEY1+vNARihnc4B' -o centroid.zip\n"],"metadata":{"id":"qrLUfXxxKrTW"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["\n","# !curl 'https://drive.usercontent.google.com/download?id=1kplQ1qGMI8toknT74vQZGdmdWxA71SiL&export=download&authuser=1&confirm=t&uuid=b3cbc041-ac21-48c2-ae8e-292ce8740044&at=APZUnTVrOqHNW27VXaiBK21WDLGW:1721012069432' \\\n","#   -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \\\n","#   -H 'accept-language: zh,zh-CN;q=0.9,en;q=0.8' \\\n","#   -H 'cookie: SEARCH_SAMESITE=CgQIzJsB; AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzku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AKEyXzX5DPrH9sI52_8NKQ8PdAQWPygZX7lnWfGcYbhSqHkBKjkmhp2XatkIcZ7zJe13aBBBcQ; __Secure-3PSIDCC=AKEyXzUBaIx_grI_NXxey-kdsxUEvmypd6sZuWDVkLIhdso2uf2mqZjNOohGnvaAbtcIGRgOEks' \\\n","#   -H 'priority: u=0, i' \\\n","#   -H 'sec-ch-ua: \"Google Chrome\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"' \\\n","#   -H 'sec-ch-ua-mobile: ?0' \\\n","#   -H 'sec-ch-ua-platform: \"Windows\"' \\\n","#   -H 'sec-fetch-dest: iframe' \\\n","#   -H 'sec-fetch-mode: navigate' \\\n","#   -H 'sec-fetch-site: same-site' \\\n","#   -H 'upgrade-insecure-requests: 1' \\\n","#   -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \\\n","#   -H 'x-client-data: CKy1yQEIlbbJAQiitskBCKmdygEItoHLAQiSocsBCIWgzQEIuMjNAQimis4BCOKTzgEI6JPOAQjum84BCJWdzgEIxZ3OAQiyn84BGPXJzQEY1+vNARihnc4B' -o press.zip\n"],"metadata":{"id":"cQJI_BcgNccz"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["\n","!curl 'https://drive.usercontent.google.com/download?id=1Pu9XSyRj47SFrmdmxLNxZMb8f3LK6oi2&export=download&authuser=1&confirm=t&uuid=baac18e7-77b9-4032-9986-f2fa3363c7b9&at=APZUnTXkqxzSouTZNqvXUkaR0rax:1721013583723' \\\n","  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \\\n","  -H 'accept-language: zh,zh-CN;q=0.9,en;q=0.8' \\\n","  -H 'cookie: SEARCH_SAMESITE=CgQIzJsB; AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQN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R6glGjwTbQM-wXfPoEAA; SIDCC=AKEyXzWe-B6HyXAxR_OcBYcoMFk3J4lI30vB814lhwaHcCUrRBEAfGMC42g7xthLy1OvXCcqji0; __Secure-1PSIDCC=AKEyXzUMnPIVkMAUR-NziPzucBvlLCh4yYw9Sb7oX8oMeCZ6gkvzukJ0l7qKwJoYhXsVHXIYrBc; __Secure-3PSIDCC=AKEyXzU66mJsYNd4oHRptjQSoKqaYqM2lNhhmshEaFSZWpWSMaKvFJq5dP0F9B8ub77Lztayy7kO' \\\n","  -H 'priority: u=0, i' \\\n","  -H 'sec-ch-ua: \"Google Chrome\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"' \\\n","  -H 'sec-ch-ua-mobile: ?0' \\\n","  -H 'sec-ch-ua-platform: \"Windows\"' \\\n","  -H 'sec-fetch-dest: iframe' \\\n","  -H 'sec-fetch-mode: navigate' \\\n","  -H 'sec-fetch-site: same-site' \\\n","  -H 'upgrade-insecure-requests: 1' \\\n","  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \\\n","  -H 'x-client-data: CKy1yQEIlbbJAQiitskBCKmdygEItoHLAQiSocsBCIWgzQEIuMjNAQimis4BCOKTzgEI6JPOAQjum84BCJWdzgEIxZ3OAQiyn84BGPXJzQEY1+vNARihnc4B' -o Testset_track_B.zip\n"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"zSkqKjB4NeQi","executionInfo":{"status":"ok","timestamp":1721013644479,"user_tz":-480,"elapsed":6224,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"088866cf-b38c-4b39-d57c-203f527f6ed9"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n","                                 Dload  Upload   Total   Spent    Left  Speed\n","100  312M  100  312M    0     0  55.0M      0  0:00:05  0:00:05 --:--:-- 90.1M\n"]}]},{"cell_type":"code","source":["\n","!curl 'https://drive.usercontent.google.com/download?id=1dM4llFIwSEpsbUJSt1jucuzV97LhwUBT&export=download&authuser=1&confirm=t&uuid=0b95937f-5e59-4c4e-b02c-be5e0a5a3a47&at=APZUnTUUKCJEvaWFLP0ZAMblWSo5:1721013113110' \\\n","  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \\\n","  -H 'accept-language: zh,zh-CN;q=0.9,en;q=0.8' \\\n","  -H 'cookie: SEARCH_SAMESITE=CgQIzJsB; AEC=AVYB7coqqJpbAt5TWooVNVp_aDFiZNB57t_gUQNwIT4IG1KVhaFStFKcVRM; SID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7sEcXEqMo-cDulaOAV9QiRAACgYKATASARYSFQHGX2MicthHYExwzkuJRXpDLmC_XxoVAUF8yKpkSuSLMm7wN8kPiklDLWpD0076; __Secure-1PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7eTxKEPCbtKJP-WpB0sS7IwACgYKAQ0SARYSFQHGX2MimRYfxLjZZnsSbRUyLnXj-xoVAUF8yKpK6mH60avbvj7dWu_Wtvny0076; __Secure-3PSID=g.a000lwhzPIqBzg0W97B8nl4OMFLevLbxH1Qlfz-Q-ETz1Zt9KdI7uXG5Vbh6OrUmdFmX1D1k3gACgYKAWMSARYSFQHGX2MiFsS_t8MOTqmRAcbHsxqG8RoVAUF8yKp0GCuI4xnwYrlT9L1pS6Ol0076; HSID=Ak0_J4cMdWxYYLsNT; SSID=AIMT0qtQWmO9_ImAP; APISID=h9-r_ylvYL8SAAMr/A-iHpJeO9Apsuge6w; SAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-1PAPISID=GiGcvVVJAk8U30rD/ARLtq0ckd5r4NZAku; __Secure-3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wmkxyO4a-6dlU77smmhjZRhZYFVdkvzkld6D4yFr1ZwCujT3sJjS1YKwBzgGYwp_L-n5-fb8wKD5GwVrgelLMoMq4ZW_iWg8wbLXCW_CnBgsD0GDp97_y1BhjQ0ISYAefkgRudMnxPwGhLvvByzC_2TAKfOHpDscOnIQZlk9vAImBJQ_BwkjV2qvQW3xWNrDskRyQ7sp5zgZV8ZBOKUvs0RzQuk-9acLl9Q; __Secure-1PSIDTS=sidts-CjEB4E2dke15kpw33BE4AFXqSqATvewJ1aF0EmEDEAGbzQtzu34R6glGjwTbQM-wXfPoEAA; __Secure-3PSIDTS=sidts-CjEB4E2dke15kpw33BE4AFXqSqATvewJ1aF0EmEDEAGbzQtzu34R6glGjwTbQM-wXfPoEAA; SIDCC=AKEyXzVN_n4DzyKvpyZ2SDgT-0dsEPKRKk6ZAH7JWWJ6RRY1no-x5OBhWXt0rchk9ktw0HmMpC0; __Secure-1PSIDCC=AKEyXzUru43f33QFdRthGSTtegX3IEvE-u_8kaO-MlBglOOzWEmmDaDA99Ee6LDLjOb4SECgCsg; __Secure-3PSIDCC=AKEyXzXWd_fus_iKYkVCgfi9VVJu0fK45kW3ERFgoGJjWMOo6EEpe4DWO5fdLwrEsadgQalyZpLQ' \\\n","  -H 'priority: u=0, i' \\\n","  -H 'sec-ch-ua: \"Google Chrome\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"' \\\n","  -H 'sec-ch-ua-mobile: ?0' \\\n","  -H 'sec-ch-ua-platform: \"Windows\"' \\\n","  -H 'sec-fetch-dest: iframe' \\\n","  -H 'sec-fetch-mode: navigate' \\\n","  -H 'sec-fetch-site: same-site' \\\n","  -H 'upgrade-insecure-requests: 1' \\\n","  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \\\n","  -H 'x-client-data: CKy1yQEIlbbJAQiitskBCKmdygEItoHLAQiSocsBCIWgzQEIuMjNAQimis4BCOKTzgEI6JPOAQjum84BCJWdzgEIxZ3OAQiyn84BGPXJzQEY1+vNARihnc4B' -o Transolver_track_B.zip"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"8vD7O9elNfKO","executionInfo":{"status":"ok","timestamp":1721013548278,"user_tz":-480,"elapsed":3425,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"48e65247-8e4d-4c56-b6a4-75dc7e2a3846"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n","                                 Dload  Upload   Total   Spent    Left  Speed\n","100 9154k  100 9154k    0     0  2762k      0  0:00:03  0:00:03 --:--:-- 2762k\n"]}]},{"cell_type":"code","source":["# import gdown\n","# code_url = 'https://drive.google.com/uc?export=download&id=1Pu9XSyRj47SFrmdmxLNxZMb8f3LK6oi2'#code\n","# centroid_url = 'https://drive.google.com/uc?export=download&id=1zEL0a_o0DBuSzRncgtxtkrFCPiegZqJd'# centroid\n","# press_url = 'https://drive.google.com/uc?export=download&id=1kplQ1qGMI8toknT74vQZGdmdWxA71SiL'\n","# test_url = 'https://drive.google.com/uc?export=download&id=1Pu9XSyRj47SFrmdmxLNxZMb8f3LK6oi2'\n","# centroid_output = '/content/train_track_B_e/'\n","# press_output = '/content/train_track_B_e/'\n","# gdown.download(centroid_url, centroid_output, quiet=False)\n","# gdown.download(press_url, press_output, quiet=False)\n","# gdown.download(test_url,'/content/')\n","# gdown.download(code_url,'/content/code/')"],"metadata":{"collapsed":true,"id":"jPiDHDNrTg-Q"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["\n","import zipfile\n","import os\n","\n","def list_and_unzip(zip_folder, extract_folder):\n","    # 确保解压目录存在\n","    if not os.path.exists(extract_folder):\n","        os.makedirs(extract_folder)\n","\n","    # 列出指定目录下所有文件和文件夹\n","    files = os.listdir(zip_folder)\n","\n","    # 过滤出.zip文件\n","    zip_files = [file for file in files if file.endswith('.zip')]\n","\n","    # 输出.zip文件列表\n","    print(\"Zip files found:\", zip_files)\n","\n","    # 逐一解压每个.zip文件\n","    for zip_file in zip_files:\n","        zip_path = os.path.join(zip_folder, zip_file)\n","        with zipfile.ZipFile(zip_path, 'r') as zip_ref:\n","            zip_ref.extractall(extract_folder)\n","            print(f\"Extracted {zip_file} to {extract_folder}\")\n","\n","\n","def unzip_file(zip_path, extract_to):\n","    \"\"\"\n","    解压 ZIP 文件到指定目录。\n","    Args:\n","    zip_path (str): ZIP 文件的路径。\n","    extract_to (str): 文件解压的目标目录。\n","    \"\"\"\n","    # 确保解压目标目录存在\n","    if not os.path.exists(extract_to):\n","        os.makedirs(extract_to)\n","\n","    with zipfile.ZipFile(zip_path, 'r') as zip_ref:\n","        zip_ref.extractall(extract_to)\n","        print(f\"Files extracted to: {extract_to}\")\n"],"metadata":{"id":"KAa3QqklR_fu"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["\n","# centroid\n","# centroid_zip_folder = '/content/train_track_B_e/'  # 替换为你的.zip文件所在目录\n","# centroid_folder = '/content/train_track_B_e/'  # 替换为你希望解压到的目录\n","# list_and_unzip(centroid_zip_folder, centroid_folder)\n","\n","# unzip_file('/content/centroid.zip','/content/train_track_B_e/')\n","# os.remove('/content/centroid.zip')\n","# unzip_file('/content/press.zip','/content/train_track_B_e/')\n","# os.remove('/content/press.zip')\n","unzip_file('/content/Testset_track_B.zip','/content/')\n","os.remove('/content/Testset_track_B.zip')\n","unzip_file('/content/Transolver_track_B.zip','/content/code/')\n","os.remove('/content/Transolver_track_B.zip')\n","# os.remove('/content/train_track_B_e/centroid.zip')\n","# os.remove('/content/train_track_B_e/press.zip')"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"YrH8j7XOSBsp","executionInfo":{"status":"ok","timestamp":1721013665916,"user_tz":-480,"elapsed":8549,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"0ddbf602-89dc-4c9f-d842-c0e6d9e4b186"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Files extracted to: /content/\n","Files extracted to: /content/code/\n"]}]},{"cell_type":"code","source":["!pip install timm"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"collapsed":true,"id":"v67_yZ7iRJax","executionInfo":{"status":"ok","timestamp":1721013671649,"user_tz":-480,"elapsed":5740,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"27487576-7b81-48fe-a6ef-c8623d6d1b31"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: timm in /usr/local/lib/python3.10/dist-packages (1.0.7)\n","Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from timm) (2.3.0+cu121)\n","Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from timm) (0.18.0+cu121)\n","Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from timm) (6.0.1)\n","Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (from timm) (0.23.4)\n","Requirement already satisfied: safetensors in /usr/local/lib/python3.10/dist-packages (from timm) (0.4.3)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (3.15.4)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (2023.6.0)\n","Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (24.1)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (2.31.0)\n","Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (4.66.4)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub->timm) (4.12.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->timm) (1.13.0)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->timm) (3.3)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (3.1.4)\n","Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (12.1.105)\n","Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (12.1.105)\n","Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (12.1.105)\n","Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (8.9.2.26)\n","Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (12.1.3.1)\n","Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (11.0.2.54)\n","Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (10.3.2.106)\n","Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (11.4.5.107)\n","Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (12.1.0.106)\n","Requirement already satisfied: nvidia-nccl-cu12==2.20.5 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (2.20.5)\n","Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (12.1.105)\n","Requirement already satisfied: triton==2.3.0 in /usr/local/lib/python3.10/dist-packages (from torch->timm) (2.3.0)\n","Requirement already satisfied: nvidia-nvjitlink-cu12 in /usr/local/lib/python3.10/dist-packages (from nvidia-cusolver-cu12==11.4.5.107->torch->timm) (12.5.82)\n","Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from torchvision->timm) (1.25.2)\n","Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.10/dist-packages (from torchvision->timm) (9.4.0)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->timm) (2.1.5)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (3.7)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub->timm) (2024.7.4)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->timm) (1.3.0)\n"]}]},{"cell_type":"code","source":["!pip install einops"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"pVdOHe56ReTa","executionInfo":{"status":"ok","timestamp":1721013681606,"user_tz":-480,"elapsed":9959,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"9ae286e6-cf59-44ae-9c68-ee8723b23ac6"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: einops in /usr/local/lib/python3.10/dist-packages (0.8.0)\n"]}]},{"cell_type":"markdown","source":["##  输出track A玩具车的预测结果"],"metadata":{"id":"8yjEnjFNrmC0"}},{"cell_type":"code","source":["with open(f'./code_A/code_track_A/configs/Transolver.yml', 'r') as f:\n","    config = yaml.safe_load(f)\n","config = dict2namespace(config)\n","device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n","\n","model = Model(n_hidden=config.model.hidden_dim,\n","        n_layers=config.model.depth,\n","        space_dim=config.model.input_dim,\n","        fun_dim=0,\n","        n_head=config.model.num_heads,\n","        mlp_ratio=config.model.mlp_ratio,\n","        out_dim=config.model.output_dim,\n","        slice_num=config.model.num_slices,\n","        patch_size=config.model.patch_size,\n","        shift=config.model.shift,\n","        n_iter=config.model.n_layer,\n","        unified_pos=0).to(device)\n","\n","model.load_state_dict(torch.load('./code_A/code_track_A/results/pretrain_Patch100_Shift5_D8_L10_slices256num256dim_0/checkpoint_best.pth'))\n","\n","\n","# -------------------------- data_generation --------------------------\n","def get_all_filenames(directory):\n","  filenames = []\n","  files = []\n","  for filename in os.listdir(directory):\n","    filenames.append(directory + '/' + filename)\n","    files.append(filename)\n","  return filenames, files\n","\n","filenames, files = get_all_filenames('Dataset/Dataset/Testing_data/Feature')\n","\n","mesh_lst = []\n","order_lst = []\n","inverse_lst = []\n","\n","for filename in filenames:\n","  mesh = o3d.io.read_point_cloud(filename)\n","  mesh = np.asarray(mesh.points)\n","  mesh_lst.append(mesh[None, ...])\n","\n","  order = np.load(f'Dataset/Dataset/Testing_data/Serialization/order_{filename[-7:-4]}.npy')\n","  inverse = np.load(f'Dataset/Dataset/Testing_data/Serialization/inverse_{filename[-7:-4]}.npy')\n","  order_lst.append(order[None, ...])\n","  inverse_lst.append(inverse[None, ...])\n","\n","mesh_lst = np.concatenate(mesh_lst, axis=0)\n","train_x = torch.from_numpy(mesh_lst).float() # (50,3586,3)\n","\n","order_lst = np.concatenate(order_lst, axis=0)\n","train_serialized_order = torch.from_numpy(order_lst) # (50,4,3586)\n","\n","inverse_lst = np.concatenate(inverse_lst, axis=0)\n","train_serialized_inverse = torch.from_numpy(inverse_lst) # (50,4,3586)\n","\n","train_dataset = TensorDataset(train_x, train_serialized_order, train_serialized_inverse)\n","train_loader = DataLoader(train_dataset, batch_size=1, shuffle=False)\n","\n","\n","# -------------------------- evaluation --------------------------\n","y_hat_list = []\n","model.eval()\n","with torch.no_grad():\n","  for n_iter, (x, order, inverse) in enumerate(train_loader):\n","    x = x.to(device)\n","    order = order.to(device)\n","    inverse = inverse.to(device)\n","\n","    y_hat = model(x, order, inverse)\n","    y_hat = y_hat[..., 0] * 48.095516 - 37.089962\n","    y_hat_list.append(y_hat.cpu().numpy())\n","\n","y_hat_list = np.concatenate(y_hat_list, axis=0)\n","\n","npy_dir = 'A_Results'\n","if not os.path.exists(npy_dir):\n","  os.makedirs(npy_dir)\n","\n","for i, file in enumerate(files):\n","  index = file[5:8]\n","  np.save(npy_dir + '/' + f'press_{index}.npy', y_hat_list[i])"],"metadata":{"id":"Z0c44HSzrlth"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["##  输出track B真实汽车几何的预测结果"],"metadata":{"id":"oxayRxu4-I0P"}},{"cell_type":"code","source":["import os\n","# 设置环境变量\n","os.environ['CUDA_VISIBLE_DEVICES'] = '0'\n","!python /content/code/Transolver_track_B/My_main.py   --epochs 69 --milestones 40 50 60 65 68 \\\n"," --gpu_id 0  --depth 5 --hidden_dim 256 --num_slices 32 --batch_size 4 --loss_type 'rl2' --submit"],"metadata":{"id":"xwJZaZVlnv-7","executionInfo":{"status":"ok","timestamp":1721013746140,"user_tz":-480,"elapsed":51532,"user":{"displayName":"刘野","userId":"06353679841549898578"}},"outputId":"2ac4e8bc-6179-4428-9e9f-cf3ffaffe799","colab":{"base_uri":"https://localhost:8080/"}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Namespace(training_data_dir='/content/train_track_B_e', testing_data_dir='/content/Testset_track_B', log_dir='/content/code/Transolver_track_B/results', gpu_id=0, num_segments=10, segments_id=0, overlap_ratio=0.5, global_normal=True, normalization=True, translate=False, loss_type='rl2', submit=True, batch_size=4, input_dim=6, output_dim=1, depth=5, hidden_dim=256, num_slices=32, num_heads=8, mlp_ratio=2, patch_size=20, shift=4, n_layer=1, epochs=69, lr=0.001, scheduler_step=30, milestones=[40, 50, 60, 65, 68], scheduler_gamma=0.5)\n","2024-07-15 03:21:35,556 - INFO - training_data_dir: /content/train_track_B_e\n","2024-07-15 03:21:35,556 - INFO - testing_data_dir: /content/Testset_track_B\n","2024-07-15 03:21:35,556 - INFO - log_dir: /content/code/Transolver_track_B/results\n","2024-07-15 03:21:35,556 - INFO - gpu_id: 0\n","2024-07-15 03:21:35,556 - INFO - num_segments: 10\n","2024-07-15 03:21:35,556 - INFO - segments_id: 0\n","2024-07-15 03:21:35,556 - INFO - overlap_ratio: 0.5\n","2024-07-15 03:21:35,557 - INFO - global_normal: True\n","2024-07-15 03:21:35,557 - INFO - normalization: True\n","2024-07-15 03:21:35,557 - INFO - translate: False\n","2024-07-15 03:21:35,557 - INFO - loss_type: rl2\n","2024-07-15 03:21:35,557 - INFO - submit: True\n","2024-07-15 03:21:35,557 - INFO - batch_size: 4\n","2024-07-15 03:21:35,557 - INFO - input_dim: 6\n","2024-07-15 03:21:35,557 - INFO - output_dim: 1\n","2024-07-15 03:21:35,557 - INFO - depth: 5\n","2024-07-15 03:21:35,557 - INFO - hidden_dim: 256\n","2024-07-15 03:21:35,557 - INFO - num_slices: 32\n","2024-07-15 03:21:35,557 - INFO - num_heads: 8\n","2024-07-15 03:21:35,557 - INFO - mlp_ratio: 2\n","2024-07-15 03:21:35,557 - INFO - patch_size: 20\n","2024-07-15 03:21:35,557 - INFO - shift: 4\n","2024-07-15 03:21:35,557 - INFO - n_layer: 1\n","2024-07-15 03:21:35,557 - INFO - epochs: 69\n","2024-07-15 03:21:35,557 - INFO - lr: 0.001\n","2024-07-15 03:21:35,558 - INFO - scheduler_step: 30\n","2024-07-15 03:21:35,558 - INFO - milestones: [40, 50, 60, 65, 68]\n","2024-07-15 03:21:35,558 - INFO - scheduler_gamma: 0.5\n","press_3.npy  score: 0.14069\n","press_19.npy  score: 0.14842\n","press_14.npy  score: 0.13814\n","press_47.npy  score: 0.13135\n","press_36.npy  score: 0.15052\n","press_34.npy  score: 0.16489\n","press_24.npy  score: 0.14107\n","press_42.npy  score: 0.13145\n","press_46.npy  score: 0.15162\n","press_41.npy  score: 0.10837\n","press_5.npy  score: 0.14384\n","press_11.npy  score: 0.09550\n","press_4.npy  score: 0.10364\n","press_43.npy  score: 0.13884\n","press_10.npy  score: 0.16186\n","press_17.npy  score: 0.13831\n","press_44.npy  score: 0.12212\n","press_12.npy  score: 0.10503\n","press_8.npy  score: 0.11603\n","press_30.npy  score: 0.12443\n","press_50.npy  score: 0.13282\n","press_13.npy  score: 0.16085\n","press_16.npy  score: 0.16638\n","press_49.npy  score: 0.15793\n","press_39.npy  score: 0.16164\n","press_15.npy  score: 0.13611\n","press_35.npy  score: 0.10504\n","press_27.npy  score: 0.12495\n","press_40.npy  score: 0.11931\n","press_32.npy  score: 0.12699\n","press_18.npy  score: 0.13607\n","press_33.npy  score: 0.14833\n","press_28.npy  score: 0.15614\n","press_1.npy  score: 0.12763\n","press_48.npy  score: 0.13824\n","press_31.npy  score: 0.11914\n","press_20.npy  score: 0.15122\n","press_38.npy  score: 0.11537\n","press_37.npy  score: 0.13077\n","press_9.npy  score: 0.11259\n","press_6.npy  score: 0.14380\n","press_23.npy  score: 0.11733\n","press_7.npy  score: 0.14593\n","press_26.npy  score: 0.15375\n","press_25.npy  score: 0.13598\n","press_22.npy  score: 0.11887\n","press_29.npy  score: 0.17125\n","press_45.npy  score: 0.14801\n","press_2.npy  score: 0.18352\n","press_21.npy  score: 0.12739\n","tensor(0.1366)\n","##########################  submit sucessfully #################\n"]}]},{"cell_type":"markdown","source":["# 主要库版本检查以及随机种子锁定"],"metadata":{"id":"p7YDBByYeYsB"}},{"cell_type":"markdown","source":["# 输出规范\n","(将答案文件夹压缩为B_result.zip,用于被程序识别)"],"metadata":{"id":"MBCalHN7bBji"}},{"cell_type":"code","source":["import os\n","import shutil\n","\n","# 源文件夹和目标文件夹路径\n","source_folder = 'A_Results'\n","destination_folder = 'code/Transolver_track_B/results/output'\n","\n","# 检查目标文件夹是否存在，如果不存在则创建\n","if not os.path.exists(destination_folder):\n","  os.makedirs(destination_folder)\n","\n","# 遍历源文件夹中的所有文件\n","for filename in os.listdir(source_folder):\n","  source_file = os.path.join(source_folder, filename)\n","  destination_file = os.path.join(destination_folder, filename)\n","\n","  # 移动文件\n","  shutil.move(source_file, destination_file)\n"],"metadata":{"id":"w2Frv0Z7tzSV"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["!pwd\n","%cd /content/code/Transolver_track_B/results/\n","!pwd\n","!zip -r B_result.zip ./output/\n","%cd /content/"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"_R4ymI9BcKYb","outputId":"b57209c7-23f4-47e9-e650-8795477e23cc","executionInfo":{"status":"ok","timestamp":1721013750689,"user_tz":-480,"elapsed":4552,"user":{"displayName":"刘野","userId":"06353679841549898578"}}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["/content\n","/content/code/Transolver_track_B/results\n","/content/code/Transolver_track_B/results\n","  adding: output/ (stored 0%)\n","  adding: output/press_9.npy (deflated 12%)\n","  adding: output/press_42.npy (deflated 12%)\n","  adding: output/press_28.npy (deflated 11%)\n","  adding: output/press_47.npy (deflated 12%)\n","  adding: output/press_34.npy (deflated 11%)\n","  adding: output/press_704.npy (deflated 13%)\n","  adding: output/press_673.npy (deflated 13%)\n","  adding: output/press_684.npy (deflated 13%)\n","  adding: output/press_679.npy (deflated 13%)\n","  adding: output/press_36.npy (deflated 11%)\n","  adding: output/press_665.npy (deflated 11%)\n","  adding: output/press_33.npy (deflated 11%)\n","  adding: output/press_686.npy (deflated 13%)\n","  adding: output/press_659.npy (deflated 13%)\n","  adding: output/press_16.npy (deflated 11%)\n","  adding: output/press_20.npy (deflated 12%)\n","  adding: output/press_21.npy (deflated 12%)\n","  adding: output/press_44.npy (deflated 12%)\n","  adding: output/press_662.npy (deflated 13%)\n","  adding: output/press_702.npy (deflated 12%)\n","  adding: output/press_710.npy (deflated 11%)\n","  adding: output/press_708.npy (deflated 12%)\n","  adding: output/press_666.npy (deflated 13%)\n","  adding: output/press_668.npy (deflated 12%)\n","  adding: output/press_722.npy (deflated 13%)\n","  adding: output/press_18.npy (deflated 12%)\n","  adding: output/press_6.npy (deflated 11%)\n","  adding: output/press_672.npy (deflated 13%)\n","  adding: output/press_709.npy (deflated 12%)\n","  adding: output/press_675.npy (deflated 12%)\n","  adding: output/press_701.npy (deflated 12%)\n","  adding: output/press_29.npy (deflated 11%)\n","  adding: output/press_658.npy (deflated 13%)\n","  adding: output/press_11.npy (deflated 12%)\n","  adding: output/press_46.npy (deflated 11%)\n","  adding: output/press_35.npy (deflated 12%)\n","  adding: output/press_667.npy (deflated 12%)\n","  adding: output/press_17.npy (deflated 11%)\n","  adding: output/press_678.npy (deflated 12%)\n","  adding: output/press_712.npy (deflated 13%)\n","  adding: output/press_41.npy (deflated 12%)\n","  adding: output/press_39.npy (deflated 11%)\n","  adding: output/press_664.npy (deflated 13%)\n","  adding: output/press_24.npy (deflated 11%)\n","  adding: output/press_30.npy (deflated 11%)\n","  adding: output/press_5.npy (deflated 11%)\n","  adding: output/press_23.npy (deflated 12%)\n","  adding: output/press_37.npy (deflated 11%)\n","  adding: output/press_2.npy (deflated 11%)\n","  adding: output/press_719.npy (deflated 12%)\n","  adding: output/press_683.npy (deflated 13%)\n","  adding: output/press_49.npy (deflated 11%)\n","  adding: output/press_663.npy (deflated 12%)\n","  adding: output/press_687.npy (deflated 13%)\n","  adding: output/press_715.npy (deflated 13%)\n","  adding: output/press_713.npy (deflated 12%)\n","  adding: output/press_703.npy (deflated 11%)\n","  adding: output/press_14.npy (deflated 11%)\n","  adding: output/press_674.npy (deflated 13%)\n","  adding: output/press_27.npy (deflated 11%)\n","  adding: output/press_695.npy (deflated 12%)\n","  adding: output/press_3.npy (deflated 11%)\n","  adding: output/press_25.npy (deflated 11%)\n","  adding: output/press_7.npy (deflated 11%)\n","  adding: output/press_660.npy (deflated 13%)\n","  adding: output/press_717.npy (deflated 12%)\n","  adding: output/press_50.npy (deflated 11%)\n","  adding: output/press_690.npy (deflated 10%)\n","  adding: output/press_48.npy (deflated 12%)\n","  adding: output/press_13.npy (deflated 11%)\n","  adding: output/press_696.npy (deflated 12%)\n","  adding: output/press_700.npy (deflated 13%)\n","  adding: output/press_31.npy (deflated 11%)\n","  adding: output/press_43.npy (deflated 11%)\n","  adding: output/press_718.npy (deflated 13%)\n","  adding: output/press_681.npy (deflated 13%)\n","  adding: output/press_691.npy (deflated 13%)\n","  adding: output/press_40.npy (deflated 11%)\n","  adding: output/press_32.npy (deflated 11%)\n","  adding: output/press_721.npy (deflated 13%)\n","  adding: output/press_38.npy (deflated 12%)\n","  adding: output/press_711.npy (deflated 12%)\n","  adding: output/press_676.npy (deflated 12%)\n","  adding: output/press_4.npy (deflated 12%)\n","  adding: output/press_15.npy (deflated 11%)\n","  adding: output/press_26.npy (deflated 11%)\n","  adding: output/press_22.npy (deflated 11%)\n","  adding: output/press_45.npy (deflated 11%)\n","  adding: output/press_697.npy (deflated 13%)\n","  adding: output/press_19.npy (deflated 11%)\n","  adding: output/press_693.npy (deflated 11%)\n","  adding: output/press_12.npy (deflated 11%)\n","  adding: output/press_677.npy (deflated 13%)\n","  adding: output/press_1.npy (deflated 11%)\n","  adding: output/press_688.npy (deflated 12%)\n","  adding: output/press_692.npy (deflated 13%)\n","  adding: output/press_705.npy (deflated 13%)\n","  adding: output/press_8.npy (deflated 12%)\n","  adding: output/press_689.npy (deflated 13%)\n","  adding: output/press_10.npy (deflated 11%)\n","/content\n"]}]},{"cell_type":"code","source":[],"metadata":{"id":"87PLkHPhkQLX"},"execution_count":null,"outputs":[]}]}